Comments (10)
Indeed. I pushed a new nuemark version. Should work now.
Thank you @Pirosauro and everyone on this thread! npm is no joke.
from nue.
@tipiirai did you change something, that can explain this?
I did:
bun install --global nuekit
bun create nue@latest
-> templatesimple-blog
cd testapp
nue
and get the similar following log, but I can still open the webpage without problems, other than the person above
show log
✓ Nue 0.4.2 • Bun 1.0.29
✓ Initialize ./.dist/dev: 105 | if (format !== 'module') return
106 | const urlPath = fileURLToPath(url.href)
107 | const pkgPath = fileURLToPath(new URL('.', packageJsonUrl))
108 | const basePath = fileURLToPath(base)
109 | if (!main) {
110 | process.emitWarning(
^
warn: No "main" or "exports" field defined in the package.json for /home/user/.bun/install/global/node_modules/nuemark/ resolving the main entry point "index.js", imported from /home/user/.bun/install/global/node_modules/nuekit/src/.
Default "index" lookups for the main are deprecated for ES modules.
at emitLegacyIndexDeprecation (/home/user/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:110:5)
at legacyMainResolve (/home/user/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:212:5)
at moduleResolve (/home/user/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:1101:20)
at defaultResolve (/home/user/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:1266:15)
at resolve (/home/user/.bun/install/global/node_modules/import-meta-resolve/index.js:32:12)
at /home/user/.bun/install/global/node_modules/nuekit/src/init.js:95:20
at resolvePath (/home/user/.bun/install/global/node_modules/nuekit/src/init.js:93:28)
at /home/user/.bun/install/global/node_modules/nuekit/src/init.js:60:19
at buildPackage (/home/user/.bun/install/global/node_modules/nuekit/src/init.js:57:31)
••••••••••✓ Serving site from ./.dist/dev
✓ Building site to: ./.dist/dev
✓ Processing styles 5
posts/post.css
posts/syntax.css
global/global.css
global/feedback.css
home.css
✓ Transpiling components 1
global/feedback.nue
✓ Generating pages 4
posts/color-strategies.md
posts/scaleable-design-system.md
posts/class-naming-strategies.md
index.md
✓ Copying static files 21
posts/img/dashboard-3.png
posts/img/colors-1.png
posts/img/dashboard-2.png
posts/img/colors-3.png
posts/img/ui-3.png
posts/img/ui-1.png
posts/img/ui-2.png
posts/img/colors-2.jpg
posts/img/dashboard-1.png
img/email.svg
img/controls.svg
img/favicon.png
img/twitter.svg
img/favicon.jpg
img/og.jpg
img/avatar.jpg
img/linkedin.svg
img/profile.jpg
img/sparkles.svg
img/feedback.svg
img/github.svg
Time taken: 586ms
✓ http://localhost:8080/
Maybe the error has to do with: b08fff5#diff-af3f6e87ca420033f10d1e6e6cb3cbdfbf3d280c57f54407c5ebf00f356c94b5
But I don't quite understand why...
Also, it seems as if not all resources are copied for the person above.
As I have no problems viewing the page, these are possibly two separate issues
from nue.
@nobkd the error indeed relates to the "main": "index.js"
property, which actually fixed the above error for me. Do you have that line on nuemark's package.json? Do you get the same error when you run nue the second time?
from nue.
I'm surprised I didn't do this sooner, but I cleared my browser cache and now the webpage opens and works as it should.
However, the error warn: No "main" or "exports" field defined in the package.json...
still appears in the logs the first time I build any Nue project now.
I'll change the name of this issue for correctness
from nue.
Can you paste the contents of your /home/user/.bun/install/global/node_modules/nuemark/package.json
here? Thanks!
from nue.
{
"name": "nuemark",
"version": "0.2.1",
"description": "Markdown dialect for rich, interactive web content",
"homepage": "https://nuejs.org",
"license": "MIT",
"type": "module",
"repository": {
"url": "https://github.com/nuejs/nue",
"directory": "packages/nuemark",
"type": "git"
},
"dependencies": {
"nue-glow": "^0.1.0",
"js-yaml": "^4.1.0",
"marked": "^9.1.2"
}
}
from nue.
Thanks! The issue should now be fixed after re-installing nuekit:
bun install nuekit --global
from nue.
I reinstalled it, but
My logs
✓ Nue 0.4.3 • Bun 1.0.29
✓ Initialize ./.dist/dev: 105 | if (format !== 'module') return
106 | const urlPath = fileURLToPath(url.href)
107 | const pkgPath = fileURLToPath(new URL('.', packageJsonUrl))
108 | const basePath = fileURLToPath(base)
109 | if (!main) {
110 | process.emitWarning(
^
warn: No "main" or "exports" field defined in the package.json for /home/maxim/.bun/install/global/node_modules/nuemark/ resolving the main entry point "index.js", imported from /home/maxim/.bun/install/global/node_modules/nuekit/src/.
Default "index" lookups for the main are deprecated for ES modules.
at emitLegacyIndexDeprecation (/home/maxim/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:110:5)
at legacyMainResolve (/home/maxim/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:212:5)
at moduleResolve (/home/maxim/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:1101:20)
at defaultResolve (/home/maxim/.bun/install/global/node_modules/import-meta-resolve/lib/resolve.js:1266:15)
at resolve (/home/maxim/.bun/install/global/node_modules/import-meta-resolve/index.js:32:12)
at /home/maxim/.bun/install/global/node_modules/nuekit/src/init.js:95:20
at resolvePath (/home/maxim/.bun/install/global/node_modules/nuekit/src/init.js:93:28)
at /home/maxim/.bun/install/global/node_modules/nuekit/src/init.js:60:19
at buildPackage (/home/maxim/.bun/install/global/node_modules/nuekit/src/init.js:57:31)
••••••••••✓ Serving site from ./.dist/dev
✓ Building site to: ./.dist/dev
✓ Processing styles 4
style/navigation.css
style/table.css
style/global.css
style/analytics.css
✓ Building scripts 1
model/index.ts
✓ Transpiling components 3
analytics.nue
app.nue
users.nue
✓ Copying static files 4
model/users.json
model/analytics.json
model/feedback.json
img/nue-logo.svg
✓ Single-page apps 1
index.html
Time taken: 13ms
✓ http://localhost:8080/
That "warn" log still exists. Is there anything I should do myself besides reinstalling?
from nue.
Same here.
Adding the main
entry point to Nuemark package.json makes the deprecation warning disappear.
See https://nodejs.org/api/deprecations.html#DEP0151
However, seems you need to bump Neumark version and publish it @tipiirai. The latest version in the registry is still have the issue. See https://www.npmjs.com/package/nuemark?activeTab=code
from nue.
I‘ll close this, as the fix should be out. Feel free to comment/reopen, if the error still occurs.
from nue.
Related Issues (20)
- In version 0.4.1, executing nue build -- production generate a file that can be no used HOT 1
- Nuekit: Show Nuekit version in the "generator" meta tag
- Support for passing options to LightningCSS HOT 5
- Nuekit: Fix custom favicon
- Nuekit: Fix automatic inclusion/exclusion of glow.css
- In version 0.4.3, `:if` instruction failure and inconsistent display performance. HOT 3
- Add an ability to import and run JS modules in server-side components HOT 8
- create error
- Update CLI help message to represent current options HOT 1
- Custom JSX/TSX components HOT 2
- Syntax error HOT 1
- Pending when creating projects with bun under Windows HOT 12
- The path of the route is expected to support regular expressions HOT 1
- component at layout.html compile error HOT 3
- When '{}' or',' in html , How to escape? HOT 1
- It can not start the server with nuekit 0.5.3, but works with nue 0.4.3 HOT 6
- auto generate manifest.json file
- a bug in the nuecli root HOT 5
- unmounted() Why is it not executed?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nue.