Code Monkey home page Code Monkey logo

Comments (20)

jbo023 avatar jbo023 commented on June 9, 2024 1

@milanzigmond you can fix it by doing the following:

In the Folder
AppData\Local.meteor\packages\webapp\2.0.0-alpha300.20\npm\node_modules

remove the following Files:

.npm-shrinkwrap.json
.package-lock.json
also delete the POSIX module directory that was created during the installation attempt.

The 2.0.0-alpha300.20 can now also be named different, thats probably an old webapp version.

from meteor.

jbo023 avatar jbo023 commented on June 9, 2024

We do have the same problem for Meteor 3.0 beta4,

While loading package [email protected]:
error: Command failed: C:\WINDOWS\system32\cmd.exe /c
C:\Users\jbo02\AppData\Local\.meteor\packages\meteor-tool\3.0.0-beta.4\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd
rebuild --update-binary
npm ERR! code 1
npm ERR! path
C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\.temp-14ktj0g.milg\node_modules\posix
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! posix.cc
npm ERR! C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\nan\nan.h(688,37):
warning C4996: 'v8::Isolate::IdleNotificationDeadline': Use MemoryPressureNotification() to influence the GC
schedule.
[C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\.temp-14ktj0g.milg\node_modules\posix\build\posix.vcxproj]
npm ERR!   (Quelldatei "../src/posix.cc" wird kompiliert)
npm ERR!
npm ERR!
C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\.temp-14ktj0g.milg\node_modules\posix\src\posix.cc(2,10):
error C1083: Datei (Include) kann nicht ge�ffnet werden: "unistd.h": No such file or directory
[C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\.temp-14ktj0g.milg\node_modules\posix\build\posix.vcxproj]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files\Microsoft Visual
Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit
(C:\Users\jbo02\AppData\Local\.meteor\packages\meteor-tool\3.0.0-beta.4\mt-os.windows.x86_64\dev_bundle\lib\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22631
npm ERR! gyp ERR! command
"C:\\Users\\jbo02\\AppData\\Local\\.meteor\\packages\\meteor-tool\\3.0.0-beta.4\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe"
"C:\\Users\\jbo02\\AppData\\Local\\.meteor\\packages\\meteor-tool\\3.0.0-beta.4\\mt-os.windows.x86_64\\dev_bundle\\lib\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js"
"rebuild"
npm ERR! gyp ERR! cwd
C:\Users\jbo02\AppData\Local\.meteor\packages\webapp\2.0.0-beta300.4\npm\node_modules\.temp-14ktj0g.milg\node_modules\posix
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok

from meteor.

jankapunkt avatar jankapunkt commented on June 9, 2024

This is the same issue under Linux , #12890

from meteor.

nachocodoner avatar nachocodoner commented on June 9, 2024

Do you think we could do something in the Meteor core level to get rid of these issues?

In this issue we also have identified an issue that requires a full or partial clean on the Meteor installation to get rid of it. In that case we need to clean the package db catalog. We may plan like a command meteor refresh to clean package db catalog. Not sure if the issue mentioned here or others alike could also be added as part of the "refresh" process.

from meteor.

jankapunkt avatar jankapunkt commented on June 9, 2024

@buzzard192 do you have by any chance some python installations, multiple python versions etc?

from meteor.

jankapunkt avatar jankapunkt commented on June 9, 2024

By the way this morning I came back to my project with this issue (the fix proposed by @buzzard192 worked) and this time I got

/home/jankapunkt/.meteor/packages/meteor-tool/.3.0.0-beta.0.8fge4e.g2d3++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/tools/fs/files.js:1248
        throw new Error("couldn't read entire resource");

A simple meteor reset fixed it, however I don't know how this happened as it run fine after the posix fix. Just wanted to add this here in case it might help in finding the issue's cause.

from meteor.

zodern avatar zodern commented on June 9, 2024

The problem is how npm rebuilds npm packages and how Meteor publishes packages is incompatible with optional dependencies that are normally only installed on certain os's. In this case, the posix dependency is an optional dependency, and would not normally be installed on Windows. However, since the webapp package was published from a different os, the posix dependency was included in the package.

Meteor detects packages that potentially have native dependencies, and have npm rebuild them after downloading the package. On Windows, rebuilding the posix package fails.

One solution might be for Meteor to also check for optional dependencies and rebuild them separately, ignoring errors.

However, this does not work for many newer packages like swc or esbuild that have a separate optional dependency for each platform/architecture: https://github.com/evanw/esbuild/blob/9d1777f23d9b64c186345223d92f319e59388d8b/npm/esbuild/package.json#L21-L43
Meteor would need to re-install esbuild instead of simply rebuilding it for the correct optional dependency to be installed.

I had worked around this to use swc in zodern:standard-minifier-js by creating a wrapper package that installs swc in a post install script after Meteor downloads zodern:standard-minifier-js.

from meteor.

mib00038 avatar mib00038 commented on June 9, 2024

Getting same issue on Ubuntu 22.04.3 LTS when creating new project with:
meteor create app-3.0 --release 3.0-beta.6

also installing node-gyp, gyp and make all failed to resolve this.

Something has happened while creating your app using git clone.
Will use cached version of skeletons.
Error message:  Using release option
=> Errors while creating your project         
                                              
While loading package [email protected]:
error: Command failed: /home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/npm
rebuild --update-binary
npm ERR! code 1
npm ERR! path /home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory
'/home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix/build'
npm ERR!   CXX(target) Release/obj.target/posix/src/posix.o
npm ERR! make: Leaving directory
'/home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix/build'
npm ERR! make: g++: No such file or directory
npm ERR! make: *** [posix.target.mk:108: Release/obj.target/posix/src/posix.o] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous>
(/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.5.0-26-generic
npm ERR! gyp ERR! command
"/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
npm ERR! gyp ERR! cwd /home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/mike/.npm/_logs/2024-03-22T14_25_35_091Z-debug-0.log
npm ERR! code 1
npm ERR! path /home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory
'/home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix/build'
npm ERR!   CXX(target) Release/obj.target/posix/src/posix.o
npm ERR! make: Leaving directory
'/home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix/build'
npm ERR! make: g++: No such file or directory
npm ERR! make: *** [posix.target.mk:108: Release/obj.target/posix/src/posix.o] Error 127
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous>
(/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Linux 6.5.0-26-generic
npm ERR! gyp ERR! command
"/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node"
"/home/mike/.meteor/packages/meteor-tool/.3.0.0-beta.6.1hgtlg3.yvcz++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
npm ERR! gyp ERR! cwd /home/mike/.meteor/packages/webapp/.2.0.0-beta300.6.oo410c.an2sr++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/.temp-szxz5i.uhla/node_modules/posix
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

from meteor.

jankapunkt avatar jankapunkt commented on June 9, 2024

Interestingly this happens only on one of my machines both running xubuntu 22.04. and I wonder what's causing this on one machine but not on the other : 🤔

The only difference I know so far is the one machine with the issues has multiple python versions installed.

from meteor.

mib00038 avatar mib00038 commented on June 9, 2024

@jankapunkt are both machines showing same version when running command meteor --version outside of a project ?

from meteor.

jankapunkt avatar jankapunkt commented on June 9, 2024

Outside a project both are on 2.15

from meteor.

jbo023 avatar jbo023 commented on June 9, 2024

The problem still persists with Meteor 3.0 Beta7, workaround still works.

from meteor.

milanzigmond avatar milanzigmond commented on June 9, 2024

I have the same issue on beta7 on windows but do not understand how to fix it, where exactly do I remove those files? do I need to make local copy of webapp beta7? I'm just confused about the fix, can someone explain please, or better fix it? thanks

from meteor.

StorytellerCZ avatar StorytellerCZ commented on June 9, 2024

@nachocodoner could this be related to #13090 issues you are facing?

from meteor.

nachocodoner avatar nachocodoner commented on June 9, 2024

could this be related to #13090 issues you are facing?

Not related. The issue there is about the upgrade of Node.js to latest version and a breaking scenario on Windows executable. But not affecting on beta.7. The issue here is about caching on incremental builds.

from meteor.

milanzigmond avatar milanzigmond commented on June 9, 2024

Thank you @jbo023!

I didn't get that files need to be removed from the GLOBAL meteor installation, I was looking inside a single project folder :).

from meteor.

ruohki avatar ruohki commented on June 9, 2024

This is still relevant for the RC.0

from meteor.

jbo023 avatar jbo023 commented on June 9, 2024

yeah unfortunatly see https://forums.meteor.com/t/meteor-3-0-rc-0-is-out/61515/26

from meteor.

ruohki avatar ruohki commented on June 9, 2024

The fix in this issue helps, I just want to make sure not be left out, like with the performance issues on Windows. At least it should work, I don't really care for slow.

from meteor.

ruohki avatar ruohki commented on June 9, 2024

Can't we just add a post install script to the installer or something that simply purges the POSIX module from the webapp when we are on the windows platform?

Adding this right after SETLOCAL in the meteor-tool package meteor.bat works like a charm for me

REM Check for the posix dependency and delete it
for /d %%v in ("%~dp0\..\..\..\webapp\*") do (
    if exist "%%v\npm\node_modules\posix" (
        rmdir /s /q "%%v\npm\node_modules\posix"
    )
)

I know this is fighting symptoms instead of root causes, but better than shipping a version that is broken on a specific platform

from meteor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.