Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and Dev commands fail in a Remix workspace without installing the node_modules in the application #42

Open
NachoVazquez opened this issue Apr 19, 2022 · 4 comments
Assignees

Comments

@NachoVazquez
Copy link

NachoVazquez commented Apr 19, 2022

The Problem

After creating an empty Remix workspace with

npx [email protected] --preset=@nrwl/remix

and installing the root packages

npm install

I cannot run any command targeting a Remix app.

nx build webapp

or

nx dev webapp

fails with the following error

command not found: remix
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webapp@ build: `npx remix build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webapp@ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

To make it work I need to run npm install inside the apps/webapp folder contrary to what the tutorial video and Readme shows.

Expected behavior

The commands should be able to use the root node_modules version of Remix to run the commands as shown in the video and Readme.

Additional Info

OS: MacOS 12.3.1
CPU: Chip M1 Pro
Node: 16.14.2

@philipjfulcher philipjfulcher self-assigned this May 5, 2022
@philipjfulcher
Copy link
Contributor

Can you try using npx to run the command?:

npx nx dev webapp

@rjaguilar
Copy link

npx nx dev webapp

requires the remix app's tsconfig.json to be updated with a baseUrl ( I used ".") - otherwise the scripts do not seem to work when trying to run from the root directory of nx.

@NachoVazquez
Copy link
Author

Sorry @philipjfulcher , I just saw the notification for your comment. I'll try later today but I think I encountered something like what @rjaguilar is describing.

@asherccohen
Copy link

The way I solved this is to add a proper project.json file with root and rootSource, then I'm able to launch via the NX console extension in vscode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants